package com.fire.user.controller;
import com.fire.user.service.jkservice.SmsService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSON;
import com.fire.core.util.AjaxResult;
import com.fire.user.model.SmsReq;

/**
 * 类描述：短信验证码接口
 * 
 * @author: Aspire
 * @version 1.0
 */
@RestController
public class SmsController {
    private static Logger logger = Logger.getLogger(SmsController.class);
    @Autowired
    private SmsService smsService;

    @RequestMapping(value = "/smsCode", method = RequestMethod.POST)
    public AjaxResult doPay(@RequestBody String json) {
        System.out.println(json);
        logger.info("获取到的返回消息" + json);
        AjaxResult result = new AjaxResult();
        SmsReq req = JSON.parseObject(json, SmsReq.class);
        // 解析token

/*        Map<String, String> map = JwtsUtil.checkHS512Token(req.getToken());
        logger.info("解析后" + map);
        if (map == null) {
            logger.info("解析token暂无用户信息");
            result.setStatus(1);
            result.setMessage("token解析失败，请重新获取用户token");
            return result;
        }*/
        // 订单校验，企业名称校验
         
        result.setMessage("hellowolrd");
        result.setStatus("0");
//        result.setContext(resp);
        return result;

    }

}
